﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Innova.Entites;
using Innova.Repository;
using Microsoft.Practices.Unity;


namespace Innova.BusinessLogic
{
    public class ReservaBL : IReservaBL
    {
        [Dependency]
        public IReservaRepository reservaRepository { get; set; }

        public List<RESERVA> GetAllReservasByServicioIdAndPatrocinadorId(int IdServ, int idPatro)
        {
            return reservaRepository.GetAllReservasByServicioIdAndPatrocinadorId(IdServ, idPatro);
        }

        public RESERVA GetFromReservaById(int id)
        {
            return reservaRepository.GetFromReservaById(id);
        }

        public void AddReserva(RESERVA reserva)
        {
            reservaRepository.AddReserva(reserva);
        }

        public void UpdateReserva(RESERVA reserva)
        {
            reservaRepository.UpdateReserva(reserva);
        }
    }
}
